package org.apache.click.doubleclick.samples.annotconfig.pages;

import org.apache.click.control.ActionLink;
import org.apache.click.doubleclick.annotationconfig.annotations.Header;
import org.apache.click.doubleclick.annotationconfig.annotations.Headers;
import org.apache.click.doubleclick.annotationconfig.annotations.Template;
import org.apache.click.util.Bindable;

@Headers({
        @Header(name = "Pragma", value = "no-cache"),
        @Header(name = "Expires", value = "2", type = "Date")
})
@Template(value = "/home.htm")
public class HomePage extends BorderPage {

    @Bindable
    private String title = "Home";

    @Bindable
    protected ActionLink myLink1 = new ActionLink(this, "onLinkClick1");

    @Bindable
    protected ActionLink myLink2 = new ActionLink(this, "onLinkClick2");

    @Bindable
    protected String msg1;

    @Bindable
    protected String msg2;

    public boolean onLinkClick1() {
        msg1 = "Click";
        return true;
    }

    public boolean onLinkClick2() {
        msg2 = "DoubleClick";
        return true;
    }
}